﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using System.Linq;
namespace BIZ
{
    class MenuBIZ
    {
        public void Insert(MENU menu)
        {
            menu.MenuID = Guid.NewGuid();
            WebUtils.db.MENUs.InsertOnSubmit(menu);
            WebUtils.db.SubmitChanges();
        }

        public void Edit(MENU menu)
        {
            MENU men = WebUtils.db.MENUs.Single(p => p.MenuID == menu.MenuID);
            men.MenuText = menu.MenuText;
            men.Url = menu.Url;
            WebUtils.db.SubmitChanges();
        }
    }
}
